173. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2023-07-12 04:42:42 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

173.1 Files compared

#LocationFileLast Modified
12023-07-12 04:42:42 +0000
2Porto v4.0.6/Theme Files/Porto Theme/app/code/Smartwave/Filterproducts/view/frontend/templates/widgetsmall_list.phtml2023-07-12 04:24:15 +0000

173.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged00
Changed00
Inserted1140
Removed00

173.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

173.4 Active regular expressions

No regular expressions were active.

173.5 Comparison detail

    1 <?php
    2 /**
    3  * Copyright © 2015 Magento. All rights reserved.
    4  * See COPYING.txt for license details.
    5  */
    6 use Magento\Framework\App\Action\Action;
    7 
    8 // @codingStandardsIgnoreFile
    9 ?>
    10 <?php
    11 /**
    12  * Product list template
    13  *
    14  * @var $block \Smartwave\Filterproducts\Block\
    15  */
    16 ?>
    17 <?php
    18 if ($exist = ($block->getProductCollection() && $block->getProductCollection()->getSize())) {
    19   $_productCollection = $block->getProductCollection()->getItems();
    20   $_helper = $this->helper('Magento\Catalog\Helper\Output');
    21   $_imagehelper = $this->helper('Magento\Catalog\Helper\Image');
    22 
    23   $_portohelper = $this->helper('Smartwave\Porto\Helper\Data');
    24 
    25   $_category_config = $_portohelper->getConfig('porto_settings/category');
    26   $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid');
    27   $_lazyload = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/optimization/lazyload');
    28 
    29   $aspect_ratio = $this->getData("aspect_ratio");
    30   if($aspect_ratio == null) {
    31       $aspect_ratio = $_category_config['aspect_ratio'];
    32   }
    33   $image_width = $this->getData("image_width");
    34   if(!$image_width) {
    35       $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300;
    36   }
    37   $image_height = $this->getData("image_height");
    38   if($aspect_ratio)
    39       $image_height = $image_width;
    40   if(!$image_height) {
    41       $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300;
    42   }
    43 }
    44 ?>
    45 <?php if (!$exist): ?>
    46     <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div>
    47 <?php else: ?>
    48     <?php
    49     $viewMode = 'grid';
    50     $image = 'category_page_grid';
    51     $hover_image = 'category_page_grid-hover';
    52     $showDescription = false;
    53     $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
    54     ?>
    55     <div class="products wrapper <?php echo $viewMode; ?> small-list products-<?php echo $viewMode; ?>">
    56         <div class="filterproducts products list items product-items">
    57             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?>
    58             <?php foreach ($_productCollection as $_product): ?>
    59                 <div class="product product-item">
    60                 <div class="product-item-info" data-container="product-grid">
    61                     <?php // Product Image ?>
    62                     <a href="<?php echo $_product->getProductUrl() ?>" class="product photo product-item-photo" tabindex="-1">
    63                         <?php
    64                             if($aspect_ratio)
    65                                 $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
    66                             else
    67                                 $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height);
    68                             $productImageUrl = $productImage->getUrl();
    69                         ?>
    70                             <img class="product-image-photo default_image <?php if(!$_lazyload): ?>porto-lazyload<?php endif;?>" <?php if(!$_lazyload): ?>data-<?php endif; ?>src="<?php echo $productImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productImage->getLabel(); ?>"/>
    71                         <?php if($_category_config['alternative_image']): ?>
    72                         <?php
    73                             if($aspect_ratio)
    74                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
    75                             else
    76                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height);
    77                             $productHoverImageUrl = $productHoverImage->getUrl();
    78                         ?>
    79                             <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?>
    80                             <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" alt="<?php //echo $productHoverImage->getLabel(); ?>"/>
    81                             <?php endif; ?>
    82                         <?php endif; ?>
    83                     </a>
    84                     <div class="product details product-item-details">
    85                         <?php
    86                             $_productNameStripped = $block->stripTags($_product->getName(), null, true);
    87                         ?>
    88                         <a class="product-item-link" href="<?php echo $_product->getProductUrl() ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?></a>
    89                         <?php if($_category_config['rating_star']): ?>
    90                         <?php
    91                             $review_html = $block->getReviewsSummaryHtml($_product, $templateType);
    92                         ?>
    93                         <?php if($review_html): ?>
    94                             <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?>
    95                         <?php else: ?>
    96                         <div class="product-reviews-summary short">
    97                             <div class="rating-summary">
    98                                 <span class="label"><span>Rating:</span></span>
    99                                 <div class="rating-result" title="0%">
    100                                     <span style="width:0"><span>0%</span></span>
    101                                 </div>
    102                             </div>
    103                         </div>
    104                         <?php endif; ?>
    105                         <?php endif; ?>
    106                         <?php if ($showDescription):?>
    107                             <div class="product description product-item-description">
    108                                 <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
    109                                 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>"
    110                                    class="action more"><?php echo __('Learn More') ?></a>
    111                             </div>
    112                         <?php endif; ?>
    113                         <?php if($_category_config['product_price']): ?>
    114                         <?php echo $block->getProductPrice($_product) ?>
    115                         <?php endif; ?>
    116                         <?php echo $block->getProductDetailsHtml($_product); ?>
    117                     </div>
    118                 </div>
    119                 </div>
    120             <?php endforeach; ?>
    121         </div>
    122     </div>
    123     <script type="text/javascript">
    124       require([
    125         'jquery',
    126         'Smartwave_Filterproducts/js/lazyload/jquery.lazyload'
    127       ], function ($) {
    128         $("img.porto-lazyload:not(.porto-lazyload-loaded)").lazyload({effect:"fadeIn", effect_speed: 400 });
    129       });
    130     </script>
    131     <?php if (!$block->isRedirectToCartEnabled()) : ?>
    132         <script type="text/x-magento-init">
    133         {
    134             "[data-role=tocart-form], .form.map.checkout": {
    135                 "catalogAddToCart": {}
    136             }
    137         }
    138         </script>
    139     <?php endif; ?>
    140 <?php endif; ?>